package com.ming.dao;

import com.ming.pojo.SSMAccount;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

//持久层
@Repository("ssmAccountDao")
public interface SSMAccountDao {

    // 查 find
    // 查-查询所有
    @Select("select * from ssmaccount")
    public List<SSMAccount> findSSMAccountAll();
    // 查-精确查找-以id
    //SSMAccount findSSMAccountById(Integer id);
    // 查-精确查找-以name
    //List<SSMAccount> findSSMAccountByNameSingle(String name);
    // 查-模糊查找-以name
    //List<SSMAccount> findSSMAccountByNameMany(String name);

    // 增 save
    @Insert("insert into ssmaccount(name,money) value (#{name},#{money})")
    void saveSSMAccount(SSMAccount ssmAccount);

    // 改 update
    //void updateSSMAccount(SSMAccount ssmAccount);
    // 删 delete
    //void deleteSSMAccount(Integer id);





}
